home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 October / CHIP Ekim 1996.iso / winbatch / freedisk.wb_ < prev    next >
Text File  |  1994-08-29  |  846b  |  32 lines

  1. ;FREESPACE
  2. ; Computes total free space on the system
  3.         Drives=DiskScan(6)     ; 6=4+2 Network and Local Drives
  4.         Dmax=strlen(Drives)
  5.         BoxOpen("Network Free Space","Looking for space on hard drives")
  6.         Delay(2)
  7.         DIndex=1
  8.         TotalSize=0
  9.         DriveReport=""
  10.  
  11.         :COUNTSPACE
  12.         NextDrive=StrSub(Drives,Dindex,1)
  13.         a=DiskFree(NextDrive)/1024
  14.         TotalSize=a+TotalSize
  15.         BoxText("Checking %NextDrive%:")
  16.         DriveReport=strcat(DriveReport,NextDrive," = ",@TAB,a,"K",@TAB,strfill("|",(a+500)/1000),"@")
  17.         DIndex=Dindex+3  ;each entry is 3 bytes long
  18.         if DIndex<=Dmax then goto COUNTSPACE
  19.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  20.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  21.         Exit
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.